package com.tidc.seaservermodel.dto;

import com.tidc.seaservermodel.entity.Task;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @author ：冯涛滔
 * @date ：Created in 2020/9/15 9:46
 * @description：
 * @modified By：
 * @version:
 */
@Data
@Accessors(chain = true) //这个注解可以使这个类的set方法返回当前对象
public class TaskDto extends Task {
    //是否能接取
    private int isReceive;

    public TaskDto(Task task,int isReceive) {
        setId(task.getId());
        setName(task.getName());
        setTypeClassify(task.getTypeClassify());
        setIntroduce(task.getIntroduce());
        setPrepositionLevel(task.getPrepositionLevel());
        setAwardLevel(task.getAwardLevel());
        setAwardMoney(task.getAwardMoney());
        setAccomplishType(task.getAccomplishType());
        setPunishmentLevel(task.getPunishmentLevel());
        setPunishmentMoney(task.getPunishmentMoney());
        setUserId(task.getUserId());
        setCreateTime(task.getCreateTime());
        setLimitTime(task.getLimitTime());
        setLimitDate(task.getLimitDate());
//        super(task);
        this.isReceive = isReceive;
    }
}
